package com.magold.start.config;

import org.andengine.audio.BaseAudioManager;
import org.andengine.util.modifier.BaseSingleValueSpanModifier;
import org.andengine.util.modifier.IModifier;
import org.andengine.util.modifier.ease.IEaseFunction;

public class VolumeModifier extends BaseSingleValueSpanModifier<BaseAudioManager<?>> {

	public VolumeModifier(BaseSingleValueSpanModifier<BaseAudioManager<?>> pBaseSingleValueSpanModifier) {
		super(pBaseSingleValueSpanModifier);
	}
	
	public VolumeModifier(
			float pDuration,
			float pFromValue,
			float pToValue) {
		super(pDuration, pFromValue, pToValue);
	}

	public VolumeModifier(
			float pDuration,
			float pFromValue,
			float pToValue,
			IEaseFunction pEaseFunction) {
		super(pDuration, pFromValue, pToValue, pEaseFunction);
	}

	public VolumeModifier(
			float pDuration,
			float pFromValue,
			float pToValue,
			IModifierListener<BaseAudioManager<?>> pModifierListener) {
		super(pDuration, pFromValue, pToValue, pModifierListener);
	}


	public VolumeModifier(
			float pDuration,
			float pFromValue,
			float pToValue,
			IModifierListener<BaseAudioManager<?>> pModifierListener,
			IEaseFunction pEaseFunction) {
		super(pDuration, pFromValue, pToValue, pModifierListener, pEaseFunction);
	}

	@Override
	protected void onSetInitialValue(BaseAudioManager<?> pItem, float pValue) {
		pItem.setMasterVolume(pValue);
	}

	@Override
	protected void onSetValue(BaseAudioManager<?> pItem, float pPercentageDone, float pValue) {
		pItem.setMasterVolume(pValue);
	}

	@Override
	public IModifier<BaseAudioManager<?>> deepCopy() throws DeepCopyNotSupportedException {
		return new VolumeModifier(this);
	}
	

}
